﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Newtonsoft.Json;
using PSI.Services;

namespace PSI.Models
{
    public class WeiXinRes
    {

        /// <summary>
        /// ID
        /// </summary>
        [JsonProperty("id")]
        public Guid id { get; set; }

        /// <summary>
        /// 订单ID
        /// </summary>
        [JsonProperty("v_orderID")]
        public Guid orderID { get; set; }

        /// <summary>
        /// 车号
        /// </summary>
        [JsonProperty("v_carnumber")]
        public string carnumber { get; set; }

        /// <summary>
        /// 车主
        /// </summary>
        [JsonProperty("v_owner")]
        public string owner { get; set; }

        /// <summary>
        /// 车主电话
        /// </summary>
        [JsonProperty("v_owner_tel")]
        public string ownerTel { get; set; }

        /// <summary>
        /// 车主报价
        /// </summary>
        [JsonProperty("f_owner_price")]
        public decimal ownerPrice { get; set; }

        /// <summary>
        /// 司机
        /// </summary>
        [JsonProperty("v_driver")]
        public string driver { get; set; }

        /// <summary>
        /// 司机电话
        /// </summary>
        [JsonProperty("v_driver_tel")]
        public string driverTel { get; set; }

        /// <summary>
        /// 预约时间
        /// </summary>
        [JsonProperty("d_resver_time")]
        public DateTime ResverTime { get; set; }

        /// <summary>
        /// 车辆最晚入港时间
        /// </summary>
        public DateTime Lastdt { get; set; }

        /// <summary>
        /// 出口箱号
        /// </summary>
        public string CntNum { get; set; }

        /// <summary>
        /// 进口0或出口1
        /// </summary>
        [JsonProperty("v_ImorOut")]
        public int ImorOut { get; set; }

        /// <summary>
        /// 是否选择0未选 1选择
        /// </summary>
        [JsonProperty("i_isselect")]
        public int Isselect { get; set; }

       //public object Orderobjce {
       //     get {
       //         if (!string.IsNullOrEmpty(this.orderID.ToString()))
       //         {
       //             if (this.ImorOut == 0)
       //             {
       //                 var result = new Import_info().GetimportSinlg(new InConsignationDetail() { Id = this.orderID.ToString() });
                        
       //                 return result;
       //             }
       //             else if (this.ImorOut == 1)
       //             {
       //                 var result = new OutportServer().GetOutportSinlg(new OutConsignationDetail() {Id=this.orderID.ToString() });
       //                 return result;
       //             }
       //             else
       //             { 
       //               return null;
       //             }
       //         }
       //         else
       //         {
       //            return null;
       //         }
       //     }
       // }
    }
}